package com.itheima.day04;

public class Demo10 {
    public static void main(String[] args) {
        String s="过儿dssaro蓉儿dad阿迪";
        String string="过儿dssaro,蓉儿dad,阿迪";
        String[] strings = string.split(",");
        for (int i = 0; i < strings.length; i++) {
            System.out.println(strings[i]+"---");
        }
        System.out.println("=======");
        String s1 = s.replaceAll("\\w+", "-");
        System.out.println("s1 = " + s1);
        System.out.println("=======");
        String[] split = s.split("\\w+");
        for (int i = 0; i < split.length; i++) {
            System.out.println(split[i]);
        }
    }
}
